package com.autowire;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {
	/**
	 * 自动装配注入方式
	 */
	@Test
	public void test1() {
		BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
		C c = (C) factory.getBean("c");
		c.c();
	}
}
